package com.zb.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zb.entity.ZjWorkLeaveMessage04;
import com.zb.mapper.ZjWorkLeaveMessage04Mapper;
import com.zb.service.ZjWorkLeaveMessage04Service;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 工单留言表 服务实现类
 * </p>
 *
 * @author WEN
 * @since 2023-10-24
 */
@Service
public class ZjWorkLeaveMessage04ServiceImpl extends ServiceImpl<ZjWorkLeaveMessage04Mapper, ZjWorkLeaveMessage04> implements ZjWorkLeaveMessage04Service {
    @Resource
    private ZjWorkLeaveMessage04Mapper workLeaveMessage04Mapper;

    // 根据工单ID更新工单客服未读留言
    @Override
    public void updateWorkEmpNotReadLeaveMessageByWorkId(Long workId) {
        workLeaveMessage04Mapper.updateWorkEmpNotReadLeaveMessageByWorkId(workId);
    }

    // 根据工单ID更新服务商未读留言
    @Override
    public void updateNetworkNotReadLeaveMessageByWorkId(Long workId, boolean engineer) {
        workLeaveMessage04Mapper.updateNetworkNotReadLeaveMessageByWorkId(workId, engineer);
    }

    // 根据工单ID更新工程师未读留言
    @Override
    public void updateEngineerNotReadLeaveMessageByWorkId(Long workId) {
        workLeaveMessage04Mapper.updateEngineerNotReadLeaveMessageByWorkId(workId);
    }

    // 根据工单ID更新工单客户未读留言
    @Override
    public void updateUserNotReadLeaveMessageByWorkId(Long workId) {
        workLeaveMessage04Mapper.updateUserNotReadLeaveMessageByWorkId(workId);
    }
}
